modifications to support Linux compilation