Confirmation of 1RXS J165443.5–191620 as an intermediate polar and its orbital and spin periods