make js sandbox a bit more browserlike