Fix import error in library_ext.machine

This change fixes the error
`NameError: global name 'LockType' is not defined`