Commissioned, warrant, and petty officers of the Coast Guard are deemed to be officers of the customs and when so acting shall, insofar as performance of the duties relating to customs laws are concerned, be subject to regulations issued by the Secretary of the Treasury governing officers of the customs.