Tagged hooks for JRuby. Fixes #467.