Add js-sources field
Link and install js sources
Check that js directory exists before installing
clean up patch a bit
support ghcjs options
merge