Correctly load mgcv package whenever method='gam'