Boundary Inference for Enforcing Security Policies in Mobile Ambients