Issue #439: Fix hooks for PIL package.