You'll have to use the 'n' locale-aware number format instead, and set your locale to one that uses a space as a thousands separator. Yes, this is painful.
'n' - Number. This is the same as 'd', except that it uses the current locale setting to insert the appropriate number separator characters.