Implement platform-specific dependencies

cc #610
This is actually called pretty frequently due to the recursive nature of resolve, and I think this could get away with the more cheap `Option<&'a str>`, would that be possible?