More stringent testing of OSX BSD like behavior. Fix BSD mis-detection on OSX depending on include order.