firefox compatibility changes, fixes #48