Fixes backwards incompatible changes introduced in npm 

Reference https://github.com/npm/npm/issues/6033#issuecomment-53310936