Removed strstr for pre PHP 5.3.0 support.

PHP < 5.3.0 doesn’t support the $before_needle parameter for strstr().

Code changed to use explode() instead.