Add check for apc.enabled option

Sometimes it's not possible to disable APC entirely and some of
apc_functions are disabled. Only thing which is possible is
to disable apc.enable option.
Merge pull request #6933 from seberm/master

Add check for apc.enabled option