Fix serialization of nans, infs and negative floats to JS. Fixes test_float_literals in https://github.com/kripken/emscripten/pull/2052 .
Merge pull request #7 from juj/fix_float_literals

Fix serialization of nans, infs and negative floats to JS.