guard matplotlib osx 10.8 logic with better platform check