Ringgit ends marginally higher against US dollar