added platform-dependent methods to retrieve new UUID, default UserAgent string
added aux function to check whether or not global lua variable is function