Fix detection of installed npm packages