Clean up some of the FreeBSD compat stuff; remove GLEW dependency.