A leg found on a beach in South Ayrshire is understood to be part of a body found on the Northern Ireland coast in May.