ARM build fix #2 redux

This seems to be the right way to do it. This works on ARM and x86 for me, and it removes the giant hack.

Since I didn't put #5 into its own branch, I'm not sure how to update that pull request, so here's a new one.