Support named before/after hooks (fix #966, close #1116)