[javascript mode] Properly handle regexp at start of file