Add begin transaction fallback for PHP 5.4