Funds in the hands of a receiver may be invested upon interest, by order of the court; but no such order can be made except upon the consent of all the parties to the action.