Implement binary:matches/2,3 BIF