An algorithm for the identification of ARX systems in the errors-in-variables framework