Install no-op logging handler only on Python >= 2.7.

Python 2.6 does not define logging.NullHandler.