added DB_CHARSET constant and using PHP 5.3+ const keyword