Apache 2.4.x/Yosemite compatibility

Thanks to @rubenvarela for the original patch and @Nainterceptor for
the research.