Improve URI parser compatibility

These commits fix issue #240