A facile synthesis of a carbon-encapsulated Fe3O4 nanocomposite and its performance as anode in lithium-ion batteries