Updated code to work with new netlib version