Fix #1167: Sample app incompatible with PHP 5.2