Maybe fixes #334

Fixes #334, but https://github.com/Araq/Nimrod/issues/383 needs to be resolved before testing it with the JS target.