Nasdaq posts record close as US stocks finish higher