Make no-ec2m work again (backport from HEAD).