Fixed has_capability function incompatibility with older plugins.