apply patch on old OS X versions, further include fixes for 10.7/10.8