Potential double layers formed by ion beam reflection in magnetized plasmas