Replace lua5-2-only method with one that exists both in lua5.2 and lua5.1
Fixed line endings