fix staticmethod/classmethod on python < 2.7