Cosmological Solutions to the Lithium Problem