Bayesian Inversion Using Active Subspaces