Fixes to get MAQ to build on OS X.