build: fix linking to CoreFoundation

If only coreaudio was activativated and not cocoa, the build failed for
missing CoreFoundation.

Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Fixes #395
build: fix regression in cross-compilation [2]

Fixup commit for 5cb8439015f5. getattr only works on dot notation.