Activate WebSecurityEnabler only for web applications

Done in order to align with the rest of the configuration. Absent this check,
the bean will be installed in non-web applications without the corresponding
dependencies, causing the bootstrap to fail.