take dev-dependencies into account to determine required version

Hi,

you probably want to have PhantomJS only in dev-dependencies but this change searches both.