Angular momentum of open quantum systems in external magnetic field