Disable native compilation when on_load attributes is present

This is a work around an Erlang bug, see #845 for more information.
Closes #845.