Refactored so the extension can be used in PHP 5.3 as well. Fixes issue #172
Merge pull request #173 from pvankouteren/issue-172-refactor-niceurls-extension

Refactored so the extension can be used in PHP 5.3 as well. Fixes issue #172