Implement flexible target specification

See commit message.
@cmr, @alexcrichton: umh, it should work, but 32-bit DragonFly will be depreciated anyway beginning from the next release, so I would prefer not to support it here! No one will ever use it!