Use polyvinyl acetate. Layman's terms= White glue. Elmer's is a very low quality version of this glue, but is easy as all hell to get. It dries hard and brittle, good for tone transfer, and is water soluble. And it will bind with almost anything that yamaha would have used for a nut. Clean both the slot and the nut of any glue or wood with 180 grit sandpaper (do this carefully as to not misshape either), apply a conservative amount of glue in the slot and onto the bottom of the nut with your finger, press the nut in and give it a little wiggle back and forth and you will feel it tack up. Do NOT tune your guitar up to pitch for at LEAST one hour. Make sure you clean up the excess with a damp paper towel and a little trick to get downward pressure is to rest the middle two strings in their slots and gently and evenly tighten the strings.
Thank you for not using superglue.
Fredericks Fix and Finish, May 2008