Anisotropy of magnetic interactions in the spin-ladder compound (C5H12N)2CuBr4