Update basejs.php

only set uri_segment if $uri_segment is set