javascript: split javascript and node target

Supporting 2 different environments in one runtime can lead to weird results when using google closures advanced optimizations.