Treat apply_filters_ref_array() as a hook function

Fixes #54