Raise warning when calling get_called_class outside of a class

Summary: PHP5 raises a warning when `get_called_class` is called without a class.

Reviewed By: @ptarjan

Differential Revision: D1423243