Squatter wins rights to $1.7m home