When any property which has been heretofore or may be hereafter purchased or acquired for the improvement of rivers and harbors is no longer needed, or is no longer serviceable and is transferred or sold, the proceeds thereof may be credited to the appropriation for the work for which it was acquired.