Apache 2.4.x/Yosemite compatibility

Thanks to @rubenvarela for the original patch and @Nainterceptor for
the research.
Merge pull request #59 from Cottser/yosemite

Apache 2.4.x/Yosemite compatibility