some changes for os x 10.8+.