take dev-dependencies into account to determine required version

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