Modified quokka.sh for portability