Remove dependency on glu shared library by implementing code inline.