Clean up bashisms in compress_js script

To be kinder to other users of this library we should aim to strip out
all bashisms to keep scripts as portable as possible. The script
itself was run through the /usr/bin/checkbashisms script found in the
devscripts package in Ubuntu.