fix smarty_modifier_ucfirst for php 5.3