Adding cross-browser preventDefault functions