This is an alternative to D7552, intended to solve the need for
dependencies when building against the static depends.
This diff simply makes the dependency search conditional so it only
applies to the non native builds. It is limited to libevent and boost as
other dependencies already have an option to turn them off which
achieves the same.
Depends on D7816.