OS X build fixes; configure: improved