Fixed compatibility for Apache 2.2 and 2.4