Amorphous boron carbide from ab initio simulations