Fixes for JS checking, and for Apache 2.2 support.