Run after_fork hooks correctly on Phusion Passenger

This uses Phusion Passenger's hook APIs.