Fixes for core context mode on OS X