Switch from instanceof to method_exists.

This change lets custom loggers implement scopes without inheriting from
BaseLog.