So, apparently, shoehorning plugins into server side browsers is near impossible, or not recommended.
I've overcome my problem by using client-side unit tests (using QUnit), but I believe the original issue can be solved by adding firewall/iptable rules that block specific urls that serve ads, on the machine used for testing.
The list of blocked urls can be taken from the ad-blocker plugins themselves, and updated regularly.