Acoustic emission due to compression of brittle materials: friction vs frictionless boundary condition