Nothing contained in title 34 of the Revised Statutes shall be construed to exempt the masters or owners of vessels from making and subscribing any oaths required by any laws of the United States not immediately relating to the collection of the duties on the importation of merchandise into the United States.