adding a more portable RANSAC implementation